package com.qst.service;

import com.qst.domain.Book;
import com.qst.domain.User;
import com.qst.entity.PageResult;

public interface BookService {
    // 查询最新上架的图书
    PageResult selectNewBooks(Integer pageNum, Integer pageSize);

    Book findById(String id);

    Integer borrowBook(Book book);

    PageResult search(Book book,Integer pageNum,Integer pageSize);

    Integer addBook(Book book);

    Integer editBook(Book book);

    // 查询当前借阅的图书
    PageResult searchBorrowed(Book book, User user, Integer pageNum, Integer pageSize);

    boolean returnBook(String id,User user);

    Integer returnConfirm(String id);
}
